package com.ourcraft.informationcollectionsystem.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.apache.ibatis.type.JdbcType;
import java.util.Date;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@TableName("DataAlterRecord")
public class DataAlterRecord {
    @TableId(type = IdType.AUTO)
    private Integer alterId;
    private Integer formId;
    private String alterOriginData;
    @TableField(value = "alter_time", jdbcType = JdbcType.TIMESTAMP)
    private Date alterTime;
    private String alterDepartment;

    public DataAlterRecord(Integer formId, String alterOriginData, String alterDepartment) {
        this.formId = formId;
        this.alterOriginData = alterOriginData;
        this.alterTime = new Date();
        this.alterDepartment = alterDepartment;
    }
}
